﻿using Microsoft.EntityFrameworkCore;

namespace IdentityServer
{
    public class AbpDbContext : DbContext
    {


        public DbSet<AbpPermissionGrant> AbpPermissionGrant { get; set; }

        public AbpDbContext() { }

        public AbpDbContext(DbContextOptions<AbpDbContext> options) : base(options)
        {
 
        }
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            base.OnConfiguring(optionsBuilder);
            //// 连接成功，但登录异常 ：https://learn.microsoft.com/zh-cn/sql/connect/ado-net/sqlclient-troubleshooting-guide?view=sql-server-ver15
            ////Server=192.168.11.132;Database=TestDb; User=sa; Password=123456;TrustServerCertificate=true;
            string s = "Server=192.168.11.137;Database=id4;User=sa;Password=123456;TrustServerCertificate=true;";
            optionsBuilder.UseSqlServer(s);

        }

    }
}
